<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: algorithm</title>
    
    <script src="http://shjs.sourceforge.net/sh_main.min.js"> </script>
    <script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/node-dark.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Class: algorithm</h1>
    
    



<section>
    
<header>
    <h2>
    algorithm
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <h4 class="name" id="algorithm"><span class="type-signature"></span>new algorithm</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This constructor is used to create an default object of algorithm.
    </div>
    
    
    
    
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 7</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="calculateArray"><span class="type-signature">&lt;static> </span>calculateArray</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function calculates the complete array. Therefore the sequence A and B have to be setted correctly.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>callBack</code></td>
            
            
            <td class="type">
            
                        function
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">callback function which is called when the calculation is finished</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 75</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="calculateCell"><span class="type-signature">&lt;static> </span>calculateCell</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function calculates one cell of the array. It uses the given position x and y, the array and the sequences.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>posX</code></td>
            
            
            <td class="type">
            
                        string
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position x</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>posY</code></td>
            
            
            <td class="type">
            
                        string
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position y</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 37</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="calculateMatrixPath"><span class="type-signature">&lt;static> </span>calculateMatrixPath</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function calculates all possible alignment pathes for the given sequences.
    </div>
    
    
    
    
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 133</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="calculateNextPathStep"><span class="type-signature">&lt;static> </span>calculateNextPathStep</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function calculates the next step of the path.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>posX</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position x in array</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>posY</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position y in array</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 235</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="createNewPath"><span class="type-signature">&lt;static> </span>createNewPath</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function is used to create a new array in algorithm.pathArray . Therefore a
	new array is created and the original number array is copied the new one.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>originArray</code></td>
            
            
            <td class="type">
            
                        array
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">original array which contents needs to be copied into the new one.</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 218</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getAlignment"><span class="type-signature">&lt;static> </span>getAlignment</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function is used to calculate the alignment by the given path index. 
	Therefore the algorithm views how the path goes through the score alignment.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pathIndex</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">index of path</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 261</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="getPathAsString"><span class="type-signature">&lt;static> </span>getPathAsString</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function is used to allocate how the path goes through the score matrix.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pathIndex</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">index of path</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 304</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="routePath"><span class="type-signature">&lt;static> </span>routePath</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function is used to route a path. If another path is recognized it calls itself.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>posX</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position x in array</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>posY</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">position y in array</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>myIndex</code></td>
            
            
            <td class="type">
            
                        myIndex
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">index of the path which is routed</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 192</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="showPath"><span class="type-signature">&lt;static> </span>showPath</h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        This function can be used to show the path with the given index on the console or to collect the path length.
    </div>
    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>pathIndex</code></td>
            
            
            <td class="type">
            
                        number
                        
                    
            </td>
            
            
            
            
            
            <td class="description last">pathIndex (0 <= x < amount of pathes)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<dt class="tag-source">Source:</dt>
	<dd class="tag-source"><ul class="dummy"><li>algorithm.js, line 159</li></ul></dd>
	
    
    
	
	
	
	
</dl>

    
    
    
    
    
    
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="algorithm.html">algorithm</a></li><li><a href="cellInfo.html">cellInfo</a></li><li><a href="gui.html">gui</a></li><li><a href="guistep.html">guistep</a></li></ul><h3>Global</h3><ul><li><a href="global.html#$">$</a></li><li><a href="global.html#debug">debug</a></li></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3</a> on Wed Jul 25 2012 23:08:27 GMT+0200 (MESZ)
</footer>

<script> sh_highlightDocument(); </script>
</body>
</html>
